import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';

import {IndexComponent} from './index/index.component';
import {NotFoundComponent} from './commen/not-found/not-found.component';
import {LoginComponent} from './login/login.component';
import {UserCenterComponent} from './user-center/user-center.component';
import {RegisterComponent} from './register/register.component';
import {DetailComponent } from './detail/detail.component';
import {ListComponent} from './list/list.component';
import {CartComponent} from './cart/cart.component';
import {LookforwardComponent} from './lookforward/lookforward.component';
import {MyCollectComponent} from './my-collect/my-collect.component';

const routes: Routes = [
    {path: '', component: IndexComponent},
    {path: 'index', component: IndexComponent},
    {path: 'login', component: LoginComponent},
    {path: 'userCenter', component: UserCenterComponent},
    {path: 'register', component: RegisterComponent},
    {path: 'detail', component:DetailComponent},
    {path: 'list', component: ListComponent},
    {path: 'cart', component: CartComponent},
    {path:'lookforward',component:LookforwardComponent},
    {path:'myCollect',component:MyCollectComponent},
    {path: '**', component: NotFoundComponent}
];

@NgModule({
    imports: [RouterModule.forRoot(routes)],
    exports: [RouterModule]
})
export class AppRoutingModule {
}
